package br.com.r1.jpastandalone.utils;

import java.util.Map;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class JPAUtils {

	private final static EntityManagerFactory emf;
	
	static{
		emf = Persistence.createEntityManagerFactory("titan");
	}
	
	public static EntityManager getEntityManager(){
		return emf.createEntityManager();
	}
	
	public static EntityManager getEntityManager(final Map properties){
		return emf.createEntityManager(properties);
	}
}
